#!/bin/bash

if [ ! -d "$HOME/study" ]; then
    mkdir -p $HOME/study
fi

if [ ! -d "$HOME/work" ]; then
    mkdir -p $HOME/work
fi

# if [ ! -d "$HOME/study/note" ]; then
    # git clone git@gitee.com:kduant/note.git  ~/study/note --depth=1
    # echo " : $HOME/study/note" >> ~/.fzf-marks
# fi

if [ ! -d "$HOME/study/FreeRTOSDemo" ]; then
    git clone git@github.com:kdurant/FreeRTOSDemo.git  ~/study/FreeRTOSDemo
    echo " : $HOME/study/FreeRTOSDemo" >> ~/.fzf-marks
    cd $HOME/study/FreeRTOSDemo
fi

if [ ! -d "$HOME/study/circuits" ]; then
    git clone git@github.com:kdurant/circuits.git ~/study/circuits
    echo " : $HOME/study/circuits" >> ~/.fzf-marks
    cd $HOME/study/circuits
fi

if [ ! -d "$HOME/study/zynq_study" ]; then
    git clone git@github.com:kdurant/zynq_study.git ~/study/zynq_study
    echo " : $HOME/study/zynq_study" >> ~/.fzf-marks
    cd $HOME/study/zynq_study
fi

if [ ! -d "$HOME/study/linux_program" ]; then
    git clone git@github.com:kdurant/linux_program.git ~/study/linux_program 
    echo " : $HOME/study/linux_program" >> ~/.fzf-marks
    cd $HOME/study/linux_program
fi

if [ ! -d "$HOME/study/leetcode" ]; then
    git clone git@github.com:kdurant/leetcode.git ~/study/leetcode --depth=1
    echo " : $HOME/study/leetcode" >> ~/.fzf-marks
    cd $HOME/study/leetcode
fi

if [ ! -d "$HOME/study/qt_example" ]; then
    git clone git@gitee.com:kduant/qt_example.git ~/study/qt_example
fi

if [ ! -d "$HOME/study/qt_minimum_template" ]; then
    git clone git@github.com:kdurant/qt_minimum_template.git ~/study/qt_minimum_template --depth=1
fi

if [ ! -d "$HOME/study/spinal_demo" ]; then
    git clone git@github.com:kdurant/spinal_demo.git  ~/study/spinal_demo 
    echo " : $HOME/study/spinal_demo" >> ~/.fzf-marks
    cd $HOME/study/spinal_demo
fi

if [ ! -d "$HOME/study/hdl_example" ]; then
    git clone git@gitee.com:kduant/hdl_example.git  ~/study/hdl_example 
    echo " : $HOME/study/hdl_example" >> ~/.fzf-marks
    cd $HOME/study/hdl_example
fi

#####################################################################
if [ ! -d "$HOME/work/radar" ]; then
    git clone git@github.com:kdurant/radar.git ~/work/radar
    echo " : $HOME/work/radar" >> ~/.fzf-marks
    cd $HOME/work/radar
fi

if [ ! -d "$HOME/work/parse-wave" ]; then
    git clone git@gitee.com:kduant/parse-wave.git  ~/work/parse-wave
    echo " : $HOME/work/parse-wave" >> ~/.fzf-marks
    cd $HOME/work/parse-wave
fi

if [ ! -d "$HOME/work/common_interface_sim" ]; then
    git clone git@gitee.com:kduant/common_interface_sim.git  ~/work/common_interface_sim
    echo " : $HOME/work/common_interface_sim" >> ~/.fzf-marks
    cd $HOME/work/common_interface_sim
fi

if [ ! -d "$HOME/work/ocean_radar" ]; then
    git clone git@github.com:kdurant/ocean.git  ~/work/ocean_radar
    echo " : $HOME/work/ocean_radar" >> ~/.fzf-marks
    cd $HOME/work/ocean_radar
fi

if [ ! -d "$HOME/work/land_radar" ]; then
    git clone git@github.com:kdurant/land_radar.git ~/work/land_radar
    echo " : $HOME/work/land_radar" >> ~/.fzf-marks
    cd $HOME/work/land_radar
fi

if [ ! -d "$HOME/work/bluegreen" ]; then
    git clone git@gitee.com:kduant/bluegreen.git ~/work/bluegreen
    echo " : $HOME/work/bluegreen" >> ~/.fzf-marks
    cd $HOME/work/bluegreen
fi

if [ ! -d "$HOME/work/CaptureCard" ]; then
    git clone git@gitee.com:kduant/CaptureCard.git ~/work/CaptureCard
    echo " : $HOME/work/CaptureCard" >> ~/.fzf-marks
    cd $HOME/work/CaptureCard
fi

if [ ! -d "$HOME/work/synthesis_info" ]; then
    git clone git@gitee.com:kduant/synthesis_info.git ~/work/synthesis_info
    echo " : $HOME/work/synthesis_info" >> ~/.fzf-marks
    cd $HOME/work/synthesis_info
fi

# if [ ! -d "$HOME/work/OpticalCom" ]; then
    # git clone git@codeup.aliyun.com:63b7d577915b61498cd09d9b/wangjun850725/OpticalCom.git ~/work/OpticalCom
    # echo " : $HOME/work/OpticalCom" >> ~/.fzf-marks
    # cd $HOME/work/OpticalCom
# fi

# if [ ! -d "$HOME/work/record_bin" ]; then
    # git clone git@codeup.aliyun.com:63b7d577915b61498cd09d9b/record_bin.git ~/work/record_bin
# fi

if [ ! -d "$HOME/work/photon_counter" ]; then
    git clone git@gitee.com:kduant/photon_counter.git ~/work/photon_counter
    echo " : $HOME/work/photon_counter" >> ~/.fzf-marks
    cd $HOME/work/photon_counter
fi

if [ ! -d "$HOME/work/tte_recv" ]; then
    git clone git@github.com:kdurant/tte.git ~/work/tte_recv
    echo " : $HOME/work/tte_recv" >> ~/.fzf-marks
    cd $HOME/work/tte_recv
fi

if [ ! -d "$HOME/work/tte_send" ]; then
    git clone git@github.com:kdurant/tte.git ~/work/tte_send
    echo " : $HOME/work/tte_send" >> ~/.fzf-marks
    cd $HOME/work/tte_send
fi

if [ ! -d "$HOME/study/opencv_tutorial" ]; then
    git clone git@github.com:kdurant/opencv_tutorial.git ~/study/opencv_tutorial
    echo " : $HOME/study/opencv_tutorial" >> ~/.fzf-marks
    cd $HOME/study/opencv_tutorial
fi

if [ ! -d "$HOME/work/airspace" ]; then
    git clone git@github.com:kdurant/airspace.git ~/work/airspace
    cd $HOME/study/opencv_tutorial
fi

if [ ! -d "$HOME/work/uav_pc" ]; then
    git clone git@github.com:kdurant/uav_pc.git ~/work/uav_pc
    cd $HOME/work/uav_pc
fi

if [ ! -d "$HOME/work/uav_fpga" ]; then
    git clone git@github.com:kdurant/uav_fpga.git ~/work/uav_fpga
    cd $HOME/work/uav_fpga
fi

